home *** CD-ROM | disk | FTP | other *** search
- ELSE
-
- Specifies an alternative for an IF statement in a script file.
-
- Format
-
- ELSE
-
- Template
-
- (none)
-
- Location
-
- Internal
-
- ELSE must be used in conjunction with the IF command. ELSE is used in an IF
- block of a script to specify an alternative action if the IF condition is not
- true. If the IF condition is not true, execution of the script jumps from the
- IF line to the line after ELSE; all intervening commands are skipped. If the
- IF condition is true, the commands immediately following the IF statement are
- executed up to the ELSE. Then, execution skips to the ENDIF statement that
- concludes the IF block.
-
- Example:
-
- Assume a script, called Display, contains the following block:
-
- IF exists picfile
- MultiView picfile
- ELSE
- ECHO "picfile is not in this directory"
- ENDIF
-
- If picfile can be found in the current directory, the MultiView program is
- executed and picfile is displayed on the screen.
-
- If picfile cannot be found in the current directory, the script skips to the
- ECHO command. The following message is displayed in the Shell window:
-
- picfile is not in this directory
-
- See also: IF, ENDIF, EXECUTE
-